package com.nai365.nart.order.controller;

import com.nai365.nart.common.security.annotation.Inner;
import com.nai365.nart.order.service.PayCallBackService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/callback" )
@Api(value = "callback", tags = "支付回调相关")
public class PayCallBackController {

	private final PayCallBackService PayCallBackService;

	@PostMapping("/pay_callback")
	@Inner
	public void pay_callback(@RequestBody String callback){
		PayCallBackService.payCallback(callback);

	}
	@PostMapping("/draw_callback")
	@Inner
	public void draw_callback(@RequestBody String callback){
		PayCallBackService.drawCallback(callback);
	}
}
